# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py-flask-oauth
_pkgname=Flask-OAuth
pkgver=0.12
pkgrel=1
pkgdesc="Flask OAuth extension"
url="https://pypi.python.org/pypi/Flask-OAuth"
arch="noarch"
license="BSD"
depends="python2 py-flask py-oauth2"
depends_dev=""
makedepends="python2-dev py-setuptools"
install=""
subpackages=""
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"

_builddir="$srcdir"/$_pkgname-$pkgver
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	python2 setup.py build || return 1
}

package() {
	cd "$_builddir"
	python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1
}

md5sums="eea1295eb191f3d3064c61df5a10cdc1  Flask-OAuth-0.12.tar.gz"
sha256sums="74eb646b3e0b3b63d4adc36024d163033fc6d01f32cf01f9e9b6c8b562313ec6  Flask-OAuth-0.12.tar.gz"
sha512sums="a51f437eb0921ebedf7af8e3191eb8f7a263639046cf4cc56e2f6b0a0ebecdc3ae5322d503e1abef06d0d359666843b36d705310d4601e21c631d638a4391fb5  Flask-OAuth-0.12.tar.gz"
